/**
 *  设备相关接口
 * **/

import request from '@/common/request.js'
import {HTTP_REQUEST_URL,http_request_url_java} from '@/config.js' 

const ssp_api={}

 

// 获取天气信息 
ssp_api.getWeather = data => request.vGet({ 
	url: 'https://restapi.amap.com/v3/weather/weatherInfo',   
	data: data   
}) 

// 获取位置详细信息 
ssp_api.getCityInfo = data => request.vGet({ 
	url: 'https://apis.map.qq.com/ws/geocoder/v1/',   
	data: data   
}) 

// 获取位置详细信息 
ssp_api.getCityInfo = data => request.vGet({ 
	url: 'https://apis.map.qq.com/ws/geocoder/v1/',   
	data: data   
})


// 上传数据
ssp_api.addData = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/public/adddata',   
	data: data, 
}) 

// 监测是否可以采集数据
ssp_api.checkArea = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/public/checkarea',   
	data: data, 
})

// 附近数据类别
ssp_api.getNearData = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/public/near-data',   
	data: data, 
})

// 我的数据类别
ssp_api.getMyData = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/public/my-data',   
	data: data, 
})

// 数据详情
ssp_api.getDataInfo = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/public/pcdata',   
	data: data, 
})

// 检测随手拍红包
ssp_api.checkSspRedPack = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/public/has-redpack',   
	data: data, 
})

// 更新
ssp_api.updateAdcode = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL+'/public/adcode',   
	data: data, 
})

ssp_api.sspfp = data => request.globalRequest({
	methods: 'POST',
	type:2,
	url: http_request_url_java+'/publicpro/sspfp',   
	data: data   
}) 



  
export default ssp_api






